<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <base href="#{request.contextPath}/" />
        <title><h:outputText value="Cadastre-se na Society" /></title>
        <link rel="stylesheet" type="text/css" href="css/cadastro.css" />
    </h:head>
    <h:body>
        <p:panel id="title" >
            <p:graphicImage value="css/img/logo8.png" id="logo" alt="imagem titulo"/>
        </p:panel>
        <p:panel id="panelBody" >
            <p:panel id="panelContent" >
                <p:graphicImage value="css/img/ladoRegister.png" id="imglado"/>
            </p:panel>
            <p:panel id="panelLogin" >
                <h:form id="formRegister" prependId="false" >
                    <p:growl life="5000" id="msgCad" />
                    <h:outputLabel value="Register your account" styleClass="labelRegister"/>
                    <h:link value="Back to login" outcome="index" id="linkLogin"/>
                    <br /><br /> 
                    <h:outputLabel for="fname" value="First name" />
                    <br /><p:inputText id="fname" value="#{usuarioMB.us.nome}" required="true" requiredMessage="Field first name is required" />
                    <br />
                    <h:outputLabel for="lname" value="Last name" />
                    <br /><p:inputText id="lname" value="#{usuarioMB.us.sobrenome}" required="true" requiredMessage="Field last name is required" />
                    <br />
                    <h:outputLabel for="date" value="Date of birth" />
                    <br /><p:calendar id="date" value="#{usuarioMB.us.dataNasc}" effect="explode" effectDuration="500" required="true" 
                                      requiredMessage="Field Date of birth is required" navigator="true" yearRange="c-200:c+0" 
                                      maxdate="#{usuarioMB.maxdate}"/>
                    <br />
                    <h:outputLabel for="login" value="Login" />
                    <br /><p:inputText id="login" value="#{usuarioMB.us.login}" required="true" requiredMessage="Field login is required" />
                    <br />
                    <h:outputLabel for="password" value="Password" />
                    <br /><p:password id="password" value="#{usuarioMB.us.senha}" required="true" requiredMessage="Field password is required" 
                                      match="matchPassword" feedback="true" goodLabel="Password strength: good" 
                                      promptLabel="Enter your password" weakLabel="Password strength: weak" 
                                      strongLabel="Password strength: strong" validatorMessage="The two passwords are diferent" />
                    <br />
                    <h:outputLabel for="matchPassword" value="Re-enter your password" />
                    <p:password id="matchPassword" />
                    <br /><p:commandButton value="Register" action="#{usuarioMB.salvar}" ajax="true" update="formRegister"/>
                </h:form>
            </p:panel>
        </p:panel>
    </h:body>
</html>
